Asssumes you have aready run: - config - workflow_deepseaNiN_Start
You now have the objects needed to explore the dataset and find the best way to apply biogeographic splits. This is a pre-step before running the workflow again on the split dataset to explore possible LKMs.
This requires exploring the dataset to theorise the best ways to split the data with: - environmental biplots/colourings
then applying the splits.
library(plotly)
library(readxl)
should include all env Vars and otus to explore, and make species richness variable
#add species data and sp richness variable
env_sub_meta1<-cbind(env,otu_6)
env_sub_meta1$spRich<-rowSums(otu_6[,-c(1:which(colnames(otu_6)=="Zoanthidae"))]!=0)
#rename X
env_sub_meta1$X <- env$X.y
env_sub_meta1 <-env_sub_meta1 %>% select (-c(X.y))
#add samplID
env_sub_meta1$SampID<-envSel$SampID
Note that biotopes were last assigned in march 2022 and therefore there are some addional samples that have not yet got a biotope assigned. These should just be NAs
biotopeInfo<-read_xlsx(file.path(dataPath, "inputs/MAREANO_provisional_biotope_classification_0322.xlsx"), sheet=1) %>%
select(-c(x_coordinate_UTM33N, y_coordinate_UTM33N))
env_sub_meta<-left_join(env_sub_meta1,biotopeInfo)
Joining, by = "SampID"
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
colnames(env_sub_meta)
[1] "X" "bathy"
[3] "diffME3" "diffME9"
[5] "landscape" "msr1_mag"
[7] "msr5_mag" "salt_max"
[9] "salt_mean" "salt_min"
[11] "salt_std" "slope3"
[13] "slope9" "spd_max"
[15] "spd_mean" "spd_min"
[17] "spd_std" "temp_max"
[19] "temp_mean" "temp_min"
[21] "temp_std" "u_bott_mean"
[23] "v_bott_mean" "X.y"
[25] "Y" "MLDmax_Robinson"
[27] "MLDmean_Robinson" "MLDmin_Robinson"
[29] "MLDsd_Robinson" "Smax_Robinson"
[31] "Smean_Robinson" "Smin_Robinson"
[33] "Ssd_Robinson" "Tmax_Robinson"
[35] "Tmean_Robinson" "Tmin_Robinson"
[37] "Tsd_Robinson" "CDirmax_Robinson"
[39] "CDirmean_Robinson" "CDirmin_Robinson"
[41] "CDirsd_Robinson" "CSpdmax_Robinson"
[43] "CSpdmean_Robinson" "CSpdmin_Robinson"
[45] "CSpdsd_Robinson" "Umax_Robinson"
[47] "Umean_Robinson" "Umin_Robinson"
[49] "Usd_Robinson" "Vmax_Robinson"
[51] "Vmean_Robinson" "Vmin_Robinson"
[53] "Vsd_Robinson" "BO22_carbonphytoltmax_bdmean"
[55] "BO22_carbonphytoltmax_ss" "BO22_carbonphytoltmin_bdmean"
[57] "BO22_carbonphytoltmin_ss" "BO22_carbonphytomean_bdmean"
[59] "BO22_carbonphytomean_ss" "BO22_carbonphytorange_bdmean"
[61] "BO22_carbonphytorange_ss" "BO22_chloltmax_bdmean"
[63] "BO22_chloltmax_ss" "BO22_chloltmin_bdmean"
[65] "BO22_chloltmin_ss" "BO22_chlomean_bdmean"
[67] "BO22_chlomean_ss" "BO22_chlorange_bdmean"
[69] "BO22_chlorange_ss" "BO22_dissoxltmax_bdmean"
[71] "BO22_dissoxltmin_bdmean" "BO22_dissoxmean_bdmean"
[73] "BO22_dissoxrange_bdmean" "BO22_icecoverltmax_ss"
[75] "BO22_icecoverltmin_ss" "BO22_icecovermean_ss"
[77] "BO22_icecoverrange_ss" "BO22_icethickltmax_ss"
[79] "BO22_icethickltmin_ss" "BO22_icethickmean_ss"
[81] "BO22_icethickrange_ss" "BO22_ironltmax_bdmean"
[83] "BO22_ironltmin_bdmean" "BO22_ironmean_bdmean"
[85] "BO22_ironrange_bdmean" "BO22_nitrateltmax_bdmean"
[87] "BO22_nitrateltmin_bdmean" "BO22_nitratemean_bdmean"
[89] "BO22_nitraterange_bdmean" "BO22_phosphateltmax_bdmean"
[91] "BO22_phosphateltmin_bdmean" "BO22_phosphatemean_bdmean"
[93] "BO22_phosphaterange_bdmean" "BO22_ppltmax_bdmean"
[95] "BO22_ppltmax_ss" "BO22_ppltmin_bdmean"
[97] "BO22_ppltmin_ss" "BO22_ppmean_bdmean"
[99] "BO22_ppmean_ss" "BO22_pprange_bdmean"
[101] "BO22_pprange_ss" "BO22_silicateltmax_bdmean"
[103] "BO22_silicateltmin_bdmean" "BO22_silicatemean_bdmean"
[105] "BO22_silicaterange_bdmean" "MS_biogeo05_dist_shore_5m"
[107] "gmorph" "sedclass"
[109] "cobB" "gravel"
[111] "mud" "rock"
[113] "sand" "coords.x1"
[115] "coords.x2" "optional"
[117] "swDensRob_avs" "MLDmean_bathy"
[119] "MLDmin_bathy" "MLDmax_bathy"
[121] "Actiniaria.red" "Actiniaria.violet"
[123] "Actiniaria.white" "Actiniaria.yellow"
[125] "Actiniaria_buried.redish" "Actiniaria_buried.yellow"
[127] "Actiniaria_buried_dark" "Actiniaria_epizoic"
[129] "Actiniaria_yellow_stolon" "Actinostola_callosa"
[131] "Alcyonidium_sp." "Alcyonium_digitatum"
[133] "Amphicteis_ninonae" "Antedonoidea"
[135] "Antho_dichotoma" "Anthomastus_sp."
[137] "Anthothela_grandiflora" "Aphroditidae"
[139] "Aporrhais_sp." "Arctica_islandica"
[141] "Asbestopluma_furcata" "Asbestopluma_pennatula"
[143] "Ascidia_sp." "Ascidia_sp..transparent"
[145] "Ascidia_sp._veined" "Ascidia_sp._violet"
[147] "Ascidia_virginea" "Ascidiacea_colonial_encrusting"
[149] "Ascidiacea_colonial_encrusting.orange" "Ascidiacea_colonial_encrusting.white"
[151] "Ascidiacea_colonial_erect" "Ascidiacea_solitary"
[153] "Ascidiacea_solitary_big" "Asconema_setubalense"
[155] "Astacidea" "Asterias_rubens"
[157] "Asteronyx_loveni" "Asterozoa"
[159] "Astropecten_irregularis" "Astropectinidae"
[161] "Axinella_infundibuliformis" "Axinellidae"
[163] "Bacterial_mat" "Balanus_balanus"
[165] "Balticina_sp." "Bathybiaster_vexillifer"
[167] "Bathycrinus_carpenterii" "Bathyplotes_natans"
[169] "Beringius_sp." "Bolocera_tuediae"
[171] "Bonelliidae" "Botryllus_sp."
[173] "Bourgueticrinina" "Brada_sp."
[175] "Bryozoa_calcareous_branched" "Bryozoa_coral"
[177] "Bryozoa_encrusting" "Bryozoa_soft_branched"
[179] "Bryozoa_soft_bush" "Buccinidae"
[181] "Buccinum_hydrophanum" "Buccinum_sp."
[183] "Buccinum_undatum" "Bugula_sp."
[185] "Cancer_pagurus" "Candelabrum_sp."
[187] "Caulophacus_arcticus" "Celleporidae"
[189] "Ceramaster.Hippasterias" "Ceramaster_granularis"
[191] "Cerianthidae" "Cerianthidae.cup_coral"
[193] "Cerianthidae.dark" "Cerianthidae.violet"
[195] "Cerianthus_lloydii" "Cerianthus_vogti"
[197] "Chaetopterus_sp." "Chelonaplysilla_sp."
[199] "Chionoecetes_opilio" "Chlamys_sp."
[201] "Chondrocladia_gigantea" "Cidaris_cidaris"
[203] "Ciona_intestinalis" "Cirripedia"
[205] "Cladorhiza_gelida" "Cladorhiza_sp."
[207] "Cladorhizidae" "Cladorhizidae_bottlebrush"
[209] "Cladorhizidae_branched" "Cladorhizidae_bush"
[211] "Cladorhizidae_stalked" "Clavularia_borealis"
[213] "Clavulariidae" "Colossendeis_angusta"
[215] "Colossendeis_proboscidea" "Colossendeis_sp."
[217] "Colus_sp." "Conocrinus_lofotensis"
[219] "Corella_parallelogramma" "Corymorpha_glacialis"
[221] "Corymorpha_nutans" "Corymorpha_sand_stolon"
[223] "Corymorpha_sp." "Crangonidae"
[225] "Craniella_cranium" "Craniella_sp."
[227] "Craniella_zetlandica" "Crisia_sp."
[229] "Crossaster_papposus" "Crossaster_sp."
[231] "Crossaster_squamatus" "Ctenodiscus_crispatus"
[233] "Ctenophora_benthic" "Cucumaria_frondosa"
[235] "Cup_coral" "Dallina_septigera"
[237] "Dendrobeania_sp." "Dendrodoa_aggregata"
[239] "Dendronotus_sp." "Didemnidae"
[241] "Diplopteraster_multipes" "Ditrupa_arietina"
[243] "Drifa_glomerata" "Duva_florida"
[245] "Dysidea_fragilis" "Echinoidea_irregular"
[247] "Echinoidea_regular" "Echinus_esculentus"
[249] "Echinus_sp." "Ectopleura_larynx"
[251] "Edwardsiidae" "Elpidia_glacialis"
[253] "Enteropneusta" "Eucratea_loricata"
[255] "Filograna_implexa" "Flustridae"
[257] "Flustrina" "Foraminifera_calcareous"
[259] "Funiculina_quadrangularis" "Geodia.Stelleta"
[261] "Geodia.Stryphnus" "Geodia_atlantica"
[263] "Geodia_barretti" "Geodia_macandrewii"
[265] "Geodia_phlegraei" "Geodia_sp."
[267] "Gersemia_rubiformis" "Geryon_trispinosus"
[269] "Gorgonacea" "Gorgonocephalus_sp."
[271] "Gracilechinus_acutus" "Gracilechinus_sp."
[273] "Grantia_compressa" "Halcampa_arctica"
[275] "Halcampa_sp." "Halcampoides_sp."
[277] "Halecium_sp." "Halichondria_sp."
[279] "Haliclona_sp." "Hamacantha_bowerbanki"
[281] "Heliometra_glacialis" "Henricia_sp."
[283] "Henricia_sp..blue" "Henricia_sp..orange"
[285] "Henricia_sp..red" "Henricia_sp..violet"
[287] "Henricia_sp..white" "Henricia_sp..yellow"
[289] "Hexactinellida" "Hexactinellida_fan_shaped"
[291] "Hexactinellida_parabol" "Hexactinellida_urn.shaped"
[293] "Hexadella_dedritifera" "Hippasteria_phrygiana"
[295] "Hirudinea" "Hormathia_digitata"
[297] "Hormathia_nodosa" "Hormathia_sp."
[299] "Hormathiidae" "Horneridae"
[301] "Hyalonema_sp." "Hyas_coarctatus"
[303] "Hyas_sp." "Hydroides_norvegica"
[305] "Hydrozoa_feather" "Hydrozoa_solitary"
[307] "Hydrozoa_tree" "Hymedesmia_paupertas"
[309] "Hymenaster_pellucidus" "Hymenodiscus_coronata"
[311] "Icasterias_panopla" "Isidella_lofotensis"
[313] "Isodictya_palmata" "Jasmineira_sp."
[315] "Kinetoskias_smitti" "Kolga_hyalina"
[317] "Kophobelemnon_stelliferum" "Kukenthalia_borealis"
[319] "Lafoea_sp." "Laminaria_sp."
[321] "Laminariales" "Lanice_conchilega"
[323] "Latrunculia_sp." "Leieschara_sp."
[325] "Leptasterias_muelleri" "Leptasterias_sp."
[327] "Leptychaster_arcticus" "Lichenoporidae"
[329] "Liponema_multicorne" "Lithodes_maja"
[331] "Lithodidae" "Lophaster_furcifer"
[333] "Lophelia_pertusa" "Lucernaria_bathyphila"
[335] "Luidia_ciliaris" "Luidia_sp."
[337] "Madrepora_oculata" "Mellonympha_mortenseni"
[339] "Mesothuria_intestinalis" "Molpadia_sp."
[341] "Molva_sp." "Munida_sarsi"
[343] "Munida_sp." "Munidopsis_serricornis"
[345] "Muriceides_kuekenthali" "Mycale_lingua"
[347] "Myxicola_sp." "Myxilla_incrustans"
[349] "Nemertea" "Nemertesia_antennina"
[351] "Neohela_sp." "Nephrops_norvegicus"
[353] "Nephtheidae" "Neptunea_despecta"
[355] "Neptunea_sp." "Nereididae"
[357] "Nothria_sp." "Oceanapia_robusta"
[359] "Ophiacanthidae" "Ophiocten_gracilis"
[361] "Ophiocten_sericeum" "Ophiocten_sp."
[363] "Ophiopholis_aculeata" "Ophiopleura_borealis"
[365] "Ophioscolex_glacialis" "Opisthobranchia"
[367] "Pachycerianthus_multiplicatus" "Paguridae"
[369] "Paragorgia_arborea" "Paralithodes_camtschaticus"
[371] "Paramuricea_placomus" "Parasmittina_jeffreysi"
[373] "Parastichopus_tremulus" "Patellogastropoda"
[375] "Pectinariidae" "Pectinidae"
[377] "Peltaster_placenta" "Pennatula_phosphorea"
[379] "Pennatulacea" "Phakellia.Axinella"
[381] "Phakellia_sp." "Phyllodoce_rosea"
[383] "Phyllodocidae" "Plicatellopsis_bowerbanki"
[385] "Polycarpa_sp." "Polychaeta_fishingnet"
[387] "Polychaeta_question_mark" "Polychaeta_sediment_tube"
[389] "Polychaeta_soft_thin_tube" "Polychaeta_tube"
[391] "Polymastia_grimaldii" "Polymastia_sp."
[393] "Polymastiidae" "Polynoidae"
[395] "Pontaster_tenuispinus" "Porania.Poraniomorpha"
[397] "Porania_sp." "Poraniidae"
[399] "Poraniomorpha_sp." "Poraniomorpha_tumida"
[401] "Porella_compressa" "Porella_sp."
[403] "Porifera_bat" "Porifera_big"
[405] "Porifera_branched" "Porifera_brown_papillae"
[407] "Porifera_cupcake" "Porifera_dirty_yellow"
[409] "Porifera_egg" "Porifera_encrusting"
[411] "Porifera_encrusting.bluegrey" "Porifera_encrusting.brown"
[413] "Porifera_encrusting.green" "Porifera_encrusting.grey"
[415] "Porifera_encrusting.orange" "Porifera_encrusting.purple"
[417] "Porifera_encrusting.red" "Porifera_encrusting.white"
[419] "Porifera_encrusting.yellow" "Porifera_erect"
[421] "Porifera_fan" "Porifera_fan.big"
[423] "Porifera_fan.small" "Porifera_fan.white"
[425] "Porifera_lily" "Porifera_lollipop"
[427] "Porifera_medium.white" "Porifera_medium.yellow"
[429] "Porifera_medium_round" "Porifera_parabol"
[431] "Porifera_small.green" "Porifera_small.irregular"
[433] "Porifera_small.orange" "Porifera_small.round_yellow"
[435] "Porifera_small.spikey" "Porifera_small.stalked"
[437] "Porifera_small.yellow" "Porifera_string"
[439] "Porifera_urn" "Porifera_white_bush"
[441] "Porifera_window" "Pourtalesia_jeffreysi"
[443] "Primnoa_resedaeformis" "Protanthea_simplex"
[445] "Pseudamussium_peslutrae" "Pseudarchaster_parelii"
[447] "Psolus_phantapus" "Psolus_sp."
[449] "Psolus_squamatus" "Pteraster_militaris"
[451] "Pteraster_obscurus" "Pteraster_pulvillus"
[453] "Pteraster_sp." "Ptychogastria_polaris"
[455] "Quasillina_brevis" "Quasillina_sp."
[457] "Radicipes_sp." "Reteporella_beaniana"
[459] "Reteporella_sp." "Sabellidae"
[461] "Saduria_sp." "Scaphopoda"
[463] "Sclerocrangon_ferox" "Serpulidae"
[465] "Sertulariidae" "Siboglinidae"
[467] "Smittinidae" "Solaster_endeca"
[469] "Solaster_sp." "Solasteridae"
[471] "Spatangoida" "Spatangus_purpureus"
[473] "Spiochaetopterus_tubes" "Spionidae"
[475] "Spirobranchus_triqueter" "Spirontocaris_sp."
[477] "Stauromedusae" "Steletta_grubei"
[479] "Stelletta_sp." "Stichastrella_rosea"
[481] "Strongylocentrotus_sp." "Stryphnus_ponderosus"
[483] "Styela_sp." "Stylasteridae"
[485] "Stylocordyla_borealis" "Swiftia_sp."
[487] "Sycon_sp." "Sycon_stalked"
[489] "Tentorium_semisuberites" "Terebellida"
[491] "Tetilla_sp." "Thenea_abyssorum"
[493] "Thenea_levis" "Thenea_sp."
[495] "Thuiaria_obsoleta" "Thuiaria_thuja"
[497] "Tremaster_mirabilis" "Tubularia_indivisa"
[499] "Tubularia_sp." "Tubulariidae"
[501] "Tunicata_trunk" "Umbellula_encrinus"
[503] "Urasterias_lincki" "Urticina_sp."
[505] "Virgularia_mirabilis" "Weberella_bursa"
[507] "Zoanthidae" "gnmds1"
[509] "gnmds2" "dca1"
[511] "dca2"
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Tmean_Robinson,
y = bathy)) +
theme_classic() +
geom_point(aes(colour = gnmds1),
size = 1) +
scale_colour_gradientn(limits = c(min(env_sub_meta$gnmds1),
max(env_sub_meta$gnmds1)),
colors=c('red','yellow','green'))+
ggtitle("Temp (mean Robinson) vs Bathy - coloured by gnmds r6 ax1")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mbathy_v_temp_nmds1.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = swDensRob_avs,
y = bathy)) +
theme_classic() +
geom_point(aes(colour = gnmds1),
size = 1) +
scale_colour_gradientn(limits = c(min(env_sub_meta$gnmds1),
max(env_sub_meta$gnmds1)),
colors=c('red','yellow','green'))+
ggtitle("Density vs Bathy - coloured by gnmds1")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_bathy_v_dens_gnmds1.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Tmean_Robinson,
y = bathy)) +
theme_classic() +
geom_point(aes(colour = X.y),
size = 1) +
scale_colour_gradientn(limits = c(-107939, 1162261),
colors=c('red','yellow','blue'))+
ggtitle("Temp (mean Robinson) vs Bathy - coloured by longitude")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mbathy_v_temp_longitude.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Tmean_Robinson,
y = bathy)) +
theme_classic() +
geom_point(aes(colour = Y),
size = 1) +
scale_colour_gradientn(limits = c(6944134, 8949734),
colors=c('red','yellow','blue'))+
ggtitle("Temp (mean Robinson) vs Bathy - coloured by latitude")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mbathy_v_temp_latitude.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Tmean_Robinson,
y = bathy)) +
theme_classic() +
geom_point(aes(colour = BO22_icecoverltmax_ss),
size = 1) +
scale_colour_gradientn(limits = c(0,0.93),
colors=c('grey','turquoise','blue'))+
ggtitle("Temp (mean Robinson) vs Bathy - coloured by ice cover LT max")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mbathy_v_temp_iceCovLTmax.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Smax_Robinson,
y = bathy)) +
theme_classic() +
geom_point(aes(colour = Tmean_Robinson),
size = 1) +
scale_colour_gradientn(limits = c(-1.1, 8.5),
colors=c('red','yellow','green'))+
ggtitle("Salinity (max Robinson) vs Bathy - coloured by av Temp (R)")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mbathy_v_salMax_temp.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Smax_Robinson,
y = Tmean_Robinson)) +
theme_classic() +
geom_point(aes(colour = gnmds1),
size = 1) +
scale_colour_gradientn(limits = c(min(env_sub_meta$gnmds1),
max(env_sub_meta$gnmds1)),
colors=c('red','yellow','green'))+
ggtitle("Temp (mean Robinson) vs Salinity (max R) - coloured by gnmds r6 ax 1 - grey 2.5-5")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mtempRmean_v_salinityRmax_nmds1.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Smax_Robinson,
y = Tmean_Robinson)) +
theme_classic() +
geom_point(aes(colour = BO22_dissoxmean_bdmean),
size = 1) +
scale_colour_gradientn(limits = c(282.5, 372.2),
colors=c('red','yellow','green'))+
ggtitle("Temp (mean Robinson) vs Salinity (max R) - coloured by dissolved oxygen")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mtempRmean_v_salinityRmax_disooxmean.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Smax_Robinson,
y = Tmean_Robinson)) +
theme_classic() +
geom_point(aes(colour = BO22_icecoverltmax_ss),
size = 1) +
scale_colour_gradientn(limits = c(0,0.93),
colors=c('blue','green','red'))+
ggtitle("Temp (AvR) v Salinity (maxR) - coloured by ice cover LT max")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mtempRmean_v_salinityRmax_iceCoveLTmax.png"),
device = "png",
dpi=800 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = X,
y = Y)) +
theme_classic() +
geom_point(aes(colour = gnmds1),
size = 1) +
scale_colour_gradientn(limits = c(min(env_sub_meta$gnmds1),
max(env_sub_meta$gnmds1)),
colors=c('red','yellow','green'))+
ggtitle("Geography (X v Y) - coloured by gnmds1")
ggplotly(tb_ax1)
NA
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_X_v_Y_gnmds1.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = swDensRob_avs),
size = 1) +
scale_colour_gradientn(limits = c(min(env_sub_meta$swDensRob_avs),
max(env_sub_meta$swDensRob_avs)),
colors=c('blue','green','red'))+
ggtitle("Geography (X v Y) - coloured by water density")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_X_v_Y_swDenRobavs.png"),
device = "png",
dpi=800 )
Saving 7 x 7 in image
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = BO22_dissoxmean_bdmean),
size = 1) +
scale_colour_gradientn(limits = c(282,373),
colors=c('blue','green','red'))+
ggtitle("Geography (X v Y) - coloured by dissovled oxygen")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_X_v_Y_dissox.png"),
device = "png",
dpi=800 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = BO22_icecoverltmax_ss),
size = 1) +
scale_colour_gradientn(limits = c(0.00001,0.93),
colors=c('blue','green','red'))+
ggtitle("Geography (X v Y) - coloured by ice cover LT max - grey <0.00001")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_X_v_Y_iceCoveLTmax.png"),
device = "png",
dpi=800 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Tmean_Robinson,
y = BO22_dissoxmean_bdmean)) +
theme_classic() +
geom_point(aes(colour = gnmds1),
size = 1) +
scale_colour_gradientn(limits = c(-2.3, 2),
colors=c('red','yellow','green'))+
ggtitle("Temp (mean Robinson) v disox mean - coloured by gnmds ax 1")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_TmeanR_v_dissoxltmin_gnmds1.png"),
device = "png",
dpi=300 )
tb_ax1<- ggplot(data = env_sub_meta,
aes(x = Tmean_Robinson,
y = BO22_dissoxmean_bdmean)) +
theme_classic() +
geom_point(aes(colour = bathy),
size = 1) +
scale_colour_gradientn(limits = c(-702, -38),
colors=c('red','yellow','green'))+
ggtitle("Temp (mean Robinson) v disox mean - coloured by bathymetry")
tb_ax1
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500mTmeanR_v_dissoxltmin_bathy.png"),
device = "png",
dpi=300 )
dis_split <- ggplot(data = env,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = MLDmean_bathy),
size = 1) +
scale_colour_manual(values=cbPalette)+
# scale_colour_brewer(palette = "Set3") +
ggtitle("Easting vs Northing - coloured by Mixed layer depth proximity")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_MLDmeanBathy.png"),
device = "png",
dpi=300 )
env_sub_meta$ax1cat<-cut(env_sub_meta$gnmds1,
breaks=c(-3.2,-3,-2,-1,0,1,2,3,3.46))
env_sub_meta$ax2cat<-cut(env_sub_meta$gnmds2,
breaks=c(-1.9,-1,0,1,2,3,4,4.9))
dis_split <- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = ax1cat),
size = 1) +
# scale_colour_manual(values=cbPalette) +# non-ordered colourblind pallette
scale_colour_brewer(palette = "Spectral") + # ordered colourblind pallette
ggtitle("Easting vs Northing - coloured by gnmds axis 1 HC units")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_ax1cat.png"),
device = "png",
dpi=300 )
env_sub_meta$temp5_1<-cut(env_sub_meta$Tmean_Robinson,
breaks=c(-1.1, 5.1, 8.5))
#
dis_split <- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = temp5_1),
size = 1) +
# scale_colour_manual(values=cbPalette) +# non-ordered colourblind pallette
scale_colour_brewer(palette = "Set1") + # ordered colourblind pallette
ggtitle("Easting vs Northing - coloured by temp thresholded at 5.1*C")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_temp5_1.png"),
device = "png",
dpi=300 )
env_sub_meta$dissoxav305<-cut(env_sub_meta$BO22_dissoxmean_bdmean,
# breaks=c(256, 282, 360)) #ltmin
breaks=c(282.5,305,372.2),
labels=c("lowO2","hiO2")) #mean
#
dis_split <- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = dissoxav305),
size = 1) +
# scale_colour_manual(values=cbPalette) +# non-ordered colourblind pallette
scale_colour_brewer(palette = "Set1") + # ordered colourblind pallette
ggtitle("Easting vs Northing - coloured by dissox av thresholded at 305")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_dissoxav305.png"),
device = "png",
dpi=300 )
env_sub_meta$iceMx_gt0<-cut(env_sub_meta$BO22_icecoverltmax_ss,
breaks=c(0, 0.00001, 0.92838))
#
dis_split <- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = iceMx_gt0),
size = 1) +
# scale_colour_manual(values=cbPalette) +# non-ordered colourblind pallette
scale_colour_brewer(palette = "Set1") + # ordered colourblind pallette
ggtitle("Easting vs Northing - coloured by ice LT Max thresholded at >0")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_iceLTmx_gt0.png"),
device = "png",
dpi=300 )
dis_split <- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = ax2cat),
size = 1) +
# scale_colour_manual(values=cbPalette) +# non-ordered colourblind pallette
scale_colour_brewer(palette = "Spectral") + # ordered colourblind pallette
ggtitle("Easting vs Northing - coloured by gnmds axis 2 HC units")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_ax2cat.png"),
device = "png",
dpi=300 )
t_gmo <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by temp 5.1 threshold",
subtitle = "First run") +
geom_point(aes(colour = factor(temp5_5))) +
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
t_gmo
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_temp5_1.png"),
device = "png",
dpi=300 )
o_gmo <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by dissox 305 threshold",
subtitle = "First run") +
geom_point(aes(colour = factor(dissox305))) +
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
o_gmo
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_dissox305.png"),
device = "png",
dpi=300 )
i_gmo <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by ice max >0 threshold",
subtitle = "First run") +
geom_point(aes(colour = factor(iceMx_gt0))) +
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
i_gmo
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_iceMxgt0.png"),
device = "png",
dpi=300 )
comp<-i_gmo+o_gmo+t_gmo
##### Save some outputs
ggexport(comp,
filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_compare.png"),
width = 1500,
height = 500)
dis_split <- ggplot(data = env_sub_meta,
aes(x = X.y,
y = Y)) +
theme_classic() +
geom_point(aes(colour = as.factor(landscape)),
size = 1) +
# scale_colour_manual(values=cbPalette) +# non-ordered colourblind pallette
scale_colour_brewer(palette = "Set1") + # ordered colourblind pallette
ggtitle("Easting vs Northing - coloured by landscape")
dis_split
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_XvY_landscape.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
c25 <- c(
"dodgerblue2", "#E31A1C", # red
"green4",
"#6A3D9A", # purple
"#FF7F00", # orange
"black", "gold1",
"skyblue2", "#FB9A99", # lt pink
"palegreen2",
"#CAB2D6", # lt purple
"#FDBF6F", # lt orange
"gray70", "khaki2",
"maroon", "orchid1", "hiDens_b1500pink1", "blue1", "steelblue4",
"darkturquoise", "green1", "yellow4", "yellow3",
"darkorange4", "brown"
)
summary(env_sub_meta$swDensRob_avs)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1035 1036 1037 1037 1038 1041
env_sub_meta$densCat<-cut(env_sub_meta$swDensRob_avs,
breaks=c(1035,1036,1037,1038,1039,1040,1041))
p_dens <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by density bins") +
geom_point(aes(colour = factor(densCat))) +
scale_colour_manual(values=c25)+
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
ggplotly(p_dens)
NA
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_densityCat.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
summary(env_sub_meta$swDensRob_avs)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1035 1036 1037 1037 1038 1041
env_sub_meta$densCat1036<-cut(env_sub_meta$swDensRob_avs,
breaks=c(1035,1036,1041))
p_dens <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by density threshold 1036") +
geom_point(aes(colour = factor(densCat1036))) +
scale_colour_manual(values=c25)+
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
ggplotly(p_dens)
NA
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_densityCat1036.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
summary(env_sub_meta$bathy)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-2717 -2145 -1954 -1955 -1652 -1504
env_sub_meta$bathyCat<-cut(env_sub_meta$bathy,
breaks=c(-2717,-2600,-2500,-2400,-2300,-2200,-2100,-2000,-1900,-1800,-1700,-1600,-1504),
labels=c("> 2600m","2500-2600m","2400-2500m","2300-2400m","2200-2300m","2100-2200m",
"2000-2100m","1900-2000m","1800-1900m","1700-1800m",
"1600-1700m","< 1600m"))
p_bath <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by sediment class") +
geom_point(aes(colour = bathyCat)) +
scale_fill_binned()+
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
ggplotly(p_bath)
NA
NA
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_bahtyCat.png"),
device = "png",
dpi=300 )
Saving 7 x 7 in image
p_bath <- ggplot(data = env_sub_meta,
aes(x = gnmds1,
y = gnmds2)) +
theme_classic() +
coord_fixed() +
ggtitle("GNMDS coloured by sediment class") +
geom_point(aes(colour = as.factor(Umbellula_encrinus))) +
scale_fill_binned(type = "viridis")+
geom_vline(xintercept = 0,
linetype = 2,
colour = "lightgray") +
geom_hline(yintercept = 0,
linetype = 2,
colour = "lightgray")+
guides(colour=guide_legend(ncol=2))
ggplotly(p_bath)
NA
NA
ggsave(filename = file.path(dataPath,"outputs/HiDensBelow1500m_gnmds_bahtyCat.png"),
device = "png",
dpi=300 )
EDIT AREA FIRST!
save.image("I:/Scripts/deepseaNiN/Renv_deepseaNiN_HiDensBelow1500m.RData") # edit area first
NOW CLEAR ENVIRONMENT BEFORE RUNNING FOR NEW AREA